package com.jeesite.modules.storage.api;

import com.jeesite.modules.storage.service.ContentService;
import com.jeesite.modules.storage.common.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 内容Controller
 */
@RestController(value = "apicontent")
@RequestMapping(value = "/api/content")
public class ContentController extends APIController {

    @Autowired
    private ContentService contentService;

    /**
     * 注册协议
     * @return 注册协议
     */
    @RequestMapping(method = RequestMethod.GET,value = "register/agreement")
    @ResponseBody
    public ServerResponse<Map> RegisterAgreement(){
        return ServerResponse.createBySuccess(200,null,contentService.registerAgreement());
    }

    /**
     * 用户协议
     * @return 用户协议
     */
    @RequestMapping(method = RequestMethod.GET,value = "trade/agreement")
    @ResponseBody
    public ServerResponse<String> tradeAgreement(){
        return ServerResponse.createBySuccess(200,null,contentService.tradeAgreement());
    }
}
